﻿@model mtm.Core.Models.HomePageModel
@{ 
    /* Copyright © 2009 - 2010 Oleg Stuhin & Rostislav Haitovich 
       To learn more about mytrip.mvc visit  
       http://mytripmvc.net  http://mytripmvc.codeplex.com 
       mytripmvc@gmail.com
       license: Microsoft Public License (Ms-PL) */ 
}
@{
    ViewBag.Title = Html.MytripPageTitle(CoreLanguage.homepage_setting, "/");
    ViewBag.Keywords=Html.MytripPageTitle(CoreLanguage.homepage_setting, ",");
    ViewBag.Description=Html.MytripPageTitle(CoreLanguage.homepage_setting, ",");
}
@section scriptlink{
@Html.ScriptLink("Page/Core.HomePage.js")
}
@section content{
<h2 class="title">@CoreLanguage.homepage_setting </h2>
@CoreLanguage.homepage_desc
<table id="content" class="@WrapRes.StyleTable2_12">
<tr>
@Html.Raw(string.Format(WrapRes.StyleTable2_14, "width:70%;"))
@Html.Raw(string.Format(WrapRes.StyleTable2_15, "width:30%;"))
@Html.Raw(WrapRes.StyleTable2_16)
@Html.Raw(string.Format(WrapRes.StyleTable2_17, "width:70%;"))
<h3 class="hometitle">@CoreLanguage.display_on_main</h3>
@Html.Raw(WrapRes.StyleTable2_13)
@Html.Raw(string.Format(WrapRes.StyleTable2_18, "width:30%;"))
<h3 class="hometitle">@CoreLanguage.available_moduls</h3>
@Html.Raw(WrapRes.StyleTable2_13)
@Html.Raw(WrapRes.StyleTable2_16)
@Html.Raw(string.Format(WrapRes.StyleTable2_19, "width:70%;"))
@Html.Raw(string.Format(WrapRes.StyleTable2_20, "width:30%;"))
</tr><tr>
@Html.Raw(string.Format(WrapRes.StyleTable2_14, "width:70%;"))
@Html.Raw(string.Format(WrapRes.StyleTable2_15, "width:30%;"))
@Html.Raw(WrapRes.StyleTable2_16)
@Html.Raw(string.Format(WrapRes.StyleTable2_17_2, "width:70%;", "left"))
<div class="last"></div>
@foreach (var item in Model.HomeItems){
    string style = "";
if(item.Assembly=="mytrip.mvc")
{style="display:none;";}
<div id="@item.Id" ><div class="last"></div>
<div class="dark">
<table class="noborders">
<tr><td> 
<span>
@Html.MytripImageLink("addremove"+item.Id,"#","/images/rightarrow_blue.png",CoreLanguage.remove,"img16")
</span>
@Html.MytripImage("/images/"+item.Culture+".png",item.Culture,"img16")
<span id="@("index"+item.Id)">@item.Index</span>
<b>(<label id="@("assembly"+item.Id)">@item.Assembly</label>)</b>
<label id="@("title"+item.Id)">@item.Name</label>
<span id="@("sort"+item.Id)" class="right">
@Html.MytripImageLink("up"+item.Id,"#","/images/uparrow_blue.png",CoreLanguage.up,"img16")
@Html.MytripImageLink("down"+item.Id,"#","/images/downarrow_blue.png",CoreLanguage.down,"img16")
</span>
</td></tr>
<tr id="@("options"+item.Id)">
<td>
<div class="withe">
<table class="font08em" >
<tr>
<td style="@style">@CoreLanguage.rows</td>
<td style="@style">@CoreLanguage.columns</td>
<td>@CoreLanguage.content_lenght (chars)</td>
<td style="@style">@CoreLanguage.image_width (px)</td>
<td style="@style">@CoreLanguage.style (v)</td>
<td style="@style">@Html.LabelFor("showtitle"+item.Id,CoreLanguage.show_title)</td>
</tr><tr><td style="@style">
@Html.TextBox("ctrrows"+item.Id,item.Rows,new{@class="w40px"})
</td><td style="@style">
@Html.TextBox("ctrcolumns"+item.Id,item.Columns,new{@class="w40px"})
</td><td>
@Html.TextBox("content"+item.Id,item.Content,new{@class="w100px"})
</td><td style="@style">
@Html.TextBox("image"+item.Id,item.Image,new{@class="w80px"})
</td><td style="@style">
@Html.TextBox("style"+item.Id,item.Style,new{@class="w20px"})
</td><td style="@style">
@Html.CheckBox("showtitle" + item.Id, item.Showtitle)
</td></tr>
</table>
</div>
</td></tr>
</table>
</div>
<div class="last"></div></div>
} 
<div class="last"></div>
@Html.Raw(WrapRes.StyleTable2_13)
@Html.Raw(string.Format(WrapRes.StyleTable2_18_2, "width:30%;", "right"))
<div class="last"></div>
@foreach (var newitem in Model.NewHomeItems){
    string style = "";
    if (newitem.Assembly == "mytrip.mvc")
    { style = "display:none;"; }
<div id="@newitem.Id" ><div class="last"></div><div class="dark">
<table class="noborders">
<tr><td> 
<span>
@Html.MytripImageLink("addremove"+newitem.Id,"#","/images/leftarrow_blue.png",CoreLanguage.add,"img16")
</span>
@Html.MytripImage("/images/"+newitem.Culture+".png",newitem.Culture,"img16")
<span id="@("index"+newitem.Id)"></span>
<b>(<label id="@("assembly"+newitem.Id)">@newitem.Assembly</label>)</b>
<label id="@("title"+newitem.Id)">@newitem.Name</label>
<span id="@("sort"+newitem.Id)" class="right" style="display: none;">
@Html.MytripImageLink("up"+newitem.Id,"#","/images/uparrow_blue.png",CoreLanguage.up,"img16")
@Html.MytripImageLink("down"+newitem.Id,"#","/images/downarrow_blue.png",CoreLanguage.down,"img16")
</span>
</td></tr>
<tr id="@("options"+newitem.Id)" style="display: none;">
<td>
<div class="withe">
<table class="font08em" >
<tr>
<td style="@style">@CoreLanguage.rows</td>
<td style="@style">@CoreLanguage.columns</td>
<td>@CoreLanguage.content_lenght (chars)</td>
<td style="@style">@CoreLanguage.image_width (px)</td>
<td style="@style">@CoreLanguage.style (v)</td>
<td style="@style">@Html.LabelFor("showtitle"+newitem.Id,CoreLanguage.show_title)</td>
</tr><tr>
<td style="@style">
@Html.TextBox("ctrrows"+newitem.Id,"1",new{@class="w40px"})
</td><td style="@style">
@Html.TextBox("ctrcolumns"+newitem.Id,"1",new{@class="w40px"})
</td><td>
@Html.TextBox("content"+newitem.Id,"100",new{@class="w100px"})
</td><td style="@style">
@Html.TextBox("image"+newitem.Id,"50",new{@class="w80px"})
</td><td style="@style">
@Html.TextBox("style"+newitem.Id,"2",new{@class="w20px"})
</td><td style="@style">
@Html.CheckBox("showtitle" + newitem.Id, true)</td>
</tr>
</table>
</div>
</td></tr>
</table>
</div>
<div class="last"></div></div>
}
<div class="last"></div> 
@Html.Raw(WrapRes.StyleTable2_13)
@Html.Raw(WrapRes.StyleTable2_16)
@Html.Raw(string.Format(WrapRes.StyleTable2_19, "width:70%;"))
@Html.Raw(string.Format(WrapRes.StyleTable2_20, "width:30%;"))
</tr>
</table>
<div class="button">
@Html.MytripButton(CoreLanguage.save, true,"save","left")
@Html.MytripButton("/Core/ControlPanel", CoreLanguage.Backtocontrolpanel, false,"left")
<span id="result" style="padding-left:10px;"></span>
</div>
}

